Common message header. More...
#include "header.h"#include "../../Common/printf.h"Functions | |
| void | printHeader (struct header *h) |
| void | serializeHeader (struct header *h, unsigned char *destination) |
| unsigned int | getSizeOfHeader (struct header *h) |
| struct header | deserializeHeader (unsigned char *source) |
Common message header.
This is a message header that has the basics:
Of course you will probably want to change this header format for your own use.
YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
| unsigned int getSizeOfHeader | ( | struct header * | h | ) |
Gets the size of the header.
| void printHeader | ( | struct header * | h | ) |
uncomment to display more information
| void serializeHeader | ( | struct header * | h, | |
| unsigned char * | destination | |||
| ) |
Serializes the Header into memory starting at destination. Number of bytes streamed is equal to getSizeOfHeader()
| h | the header to serialize | |
| destination | points to a region of memory at least getSizeOfHeader() bytes in size |
1.6.3